
#日程页面类

from selenium.webdriver.common.by import By
from page.base_page import BasePage

class SchedulePage(BasePage):
    url = "/crm/index.php?m=event"

    #定位器
    newschedule_locator = (By.LINK_TEXT, '新建日程')  # 新建日程

    # 获取当前页面地址
    def get_current_url(self):
        return self.driver.current_url

    #点击新建日程
    def click_newschedule(self):
        self.driver.find_element(*self.newschedule_locator).click()


    # #断言  获取表格内容
    # def richengbiaoge(self,table_loc,row,cell):
    #     cell = str(cell)
    #     row = str(row)
    #     locator = table_loc[1]+'/tbody/tr['+row+']/td['+ cell +']'+'/a'
    #     text = self.driver.find_element(By.XPATH,locator).text
    #     return text

